/**
 * 
 */
package info.niwota.webagent.peer;

import java.io.Serializable;

/**
 * @author qiangli
 *
 */
public class Note implements Serializable {

	private static final long serialVersionUID = 1L;
	
	public static final int RC_SUCCESS = 0;
	
	public static final int RC_UNAVAILABLE = -100;

	public static final int RC_INVALID_ID = -200;

	public static final int RC_ERROR = -900;

	public Note() {
	}

	public String tid;
	public String type;
	public String message;
	public String attachment;
	public int rc;

	public static String errorMessage(int rc) {
		switch(rc) {
		case RC_SUCCESS:
			return "Success";
		case RC_INVALID_ID:
			return "Invalid ID";
		case RC_UNAVAILABLE:
			return "Peer not available";
		case RC_ERROR:
			return "Failed";
		}
		return "Failed";
	}
}
